﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AMS.Core.Data;

namespace AMS.DD35.DbAccess.SqlClient
{
    public class SqlEDMLoginConnector : ILoginConnector
    {
        public SqlEDMLoginConnector()
        { }

        public bool VerifyUsernamePassword(LoginData loginData)
        {
            using (DD35DataEntities dbContext = new DD35DataEntities())
            {
                User user = dbContext.Users.FirstOrDefault(u => u.Username == loginData.Username && u.Password_Hash == loginData.PasswordHash);
                return user != null;
            }
        }
    }
}
